package dongdongmovie.controller;

import com.dongdongmovie.pojo.TArea;
import com.dongdongmovie.pojo.TCharnnel;
import com.dongdongmovie.pojo.TType;
import com.dongdongmovie.pojo.TYears;
import com.dongdongmovie.service.TArea_Service;
import com.dongdongmovie.service.TCharnnel_Service;
import com.dongdongmovie.service.TType_Service;
import com.dongdongmovie.service.TYears_Service;
import org.apache.dubbo.config.annotation.DubboReference;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;

@Controller
@RequestMapping("TCharnnel")
public class TCharnnel_Controller {

    //注入mapper
    @DubboReference
    private TCharnnel_Service tCharnnel_service;
    @DubboReference
    private TType_Service tType_service;
    @DubboReference
    private TYears_Service tYears_service;
    @DubboReference
    private TArea_Service tArea_service;

    //查询栏位数据
    @ResponseBody
    @RequestMapping("show")
    public List<TCharnnel> show(){
        List<TCharnnel> show = tCharnnel_service.show();
        return show;
    }

    //查询tType数据
    @ResponseBody
    @RequestMapping("showtType")
    public List<TType> showtType(){
        List<TType> show = tType_service.show();
        return show;
    }

    //查询TYears数据
    @ResponseBody
    @RequestMapping("showtYears")
    public List<TYears> showtYears(){
        List<TYears> show = tYears_service.show();
        return show;
    }

    //查询TArea数据
    @ResponseBody
    @RequestMapping("showtArea")
    public List<TArea> showTArea(){
        List<TArea> show = tArea_service.show();
        return show;
    }
}
